package com.idealighter.game.server.db.datadb.mapper;

import com.idealighter.game.server.db.datadb.generate.domain.RoomCardNiuniuScoreDetailsDomain;
import com.idealighter.game.server.db.datadb.generate.mapper.RoomCardNiuniuScoreDetailsDomainMapper;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface RoomCardNiuniuScoreDetailsMapper extends RoomCardNiuniuScoreDetailsDomainMapper {
  // @formatter:off
  @Insert({ "<script>", //
      "insert into room_card_niuniu_score_details (room, player_id, ", "super_id, player_name, ",
      "round, bet, score, total_score, ", "bet_other_chips, bet_other_player_id, ",
      "bet_other_player_name, call_banker_multiple, ",
      "card_type, ", "card_values, is_banker)", "values",
      "<foreach collection='records' item='record' separator=','>",
      "(#{record.room,jdbcType=BIGINT}, #{record.playerId,jdbcType=BIGINT}, ",
      "#{record.superId,jdbcType=BIGINT}, #{record.playerName,jdbcType=VARCHAR}, ",
      "#{record.round,jdbcType=INTEGER}, #{record.bet,jdbcType=BIGINT},",
      "#{record.score,jdbcType=BIGINT},",
      "#{record.totalScore,jdbcType=BIGINT},",
      "#{record.betOtherChips,jdbcType=BIGINT}, ",
      "#{record.betOtherPlayerId,jdbcType=BIGINT}, ",
      "#{record.betOtherPlayerName,jdbcType=VARCHAR}, ",
      "#{record.callBankerMultiple,jdbcType=INTEGER},",
      "#{record.cardType,jdbcType=TINYINT}, ",
      "#{record.cardValues,jdbcType=VARCHAR}, #{record.isBanker,jdbcType=BIT})", "</foreach>", //
      "</script>" })
  // @formatter:on
  int insertBatch(@Param("records") List<RoomCardNiuniuScoreDetailsDomain> records);
}
